N/A
This application is generally directed to data storage systems and in particular to data storage systems that store both synchronous and asynchronous data in the same data storage file.
Data logging devices are often used to store measurements collected by sensor devices at regular, periodic intervals, referred to herein as xe2x80x9csynchronous data.xe2x80x9d For example, a temperature sensor may provide 8 bits of temperature data every 10 minutes. Reconstructing the temperature over a time period of several measurements is then a matter of determining the time the initial temperature data was taken, which may be stored by the data logging device in conjunction with the initial data, and then using the known periodic interval between each subsequent temperature measurement to reconstruct the temperature over the desired time period.
In some circumstances, it is important to store data associated with the occurrence of an event or a condition that does not necessarily occur at regular periodic intervals, referred to herein as xe2x80x9casynchronous data.xe2x80x9d For example, it may be desirable to store the time an external switch closure or opening occurs. In these circumstances, not only is the data associated with the event stored, but the time that the event occurred must be stored as well.
In some circumstances, it may be desirable to store both synchronous and asynchronous data in the same data file. Since the synchronous data may be of a type distinct from the type(s) of the asynchronous data, it is necessary to uniquely identify each recorded data type along with the absolute or relative time the data was recorded. In some circumstances, it may be desirable to store other data-characterizing information in association with one or more sets of data. Storing all of the data required to enable later use of co-mingled synchronous and asynchronous data has heretofore represented an inefficient use of data storage space.
What is needed therefore is a method for efficiently storing both synchronous and asynchronous data, along with all necessary characterizing information, in the same data storage file.
A method and apparatus for efficiently storing interleaved synchronous and asynchronous data in a single data storage file is disclosed. Normally a header area is placed first in the data file. This header includes initial information such as the starting time, time zone, enabled sensors, sensor descriptions, location and the like. After the header, synchronous data is stored as it is received at regular, periodic intervals. A data analysis system, which presumes a data record is a synchronous data record absent characterization to the contrary, knows the time interval between successive instances of synchronous data storage and can determine the time that a particular synchronous data set was recorded relative to the starting time. The size of the synchronous data packet is usually constant, although it could be changed during recording process if the change is described by an asynchronous event.
Asynchronous data is stored in such a way to make it distinguishable from the synchronous data records in the data file. To accomplish this, a unique data pattern, such as one often used to indicate the end of valid data in a data_file, is defined. The device recording the data in the data file is not allowed to use the unique data pattern as a representation of synchronous data. It may thus be referred to as a precluded data value.
The asynchronous data record starts with this data pattern and also includes a type field for identifying the associated data type to a data analysis system. At the very least, the type field indicates to the data analysis system that the respective data was recorded asynchronously and that further data must be processed to determine the time at which the respective data was recorded. The type field may also be used for further characterizing the associated asynchronous event.
In one embodiment, the time delay from the last recorded data record (synchronous or asynchronous) is determined and also stored in a variable length characterizing field associated with the respective asynchronous data. The characterizing field includes data which identifies to the data analysis system the size of the time-delay data and the variable length time-delay data itself.
Other aspects, features, and advantages of the present invention are disclosed in the detailed description that follows.